package entity;

import java.io.Serializable;

/**
 * Created by zhuge on 2017/10/14.
 */
public class Result implements Serializable {


    private boolean flag;
    private String message;

    public Result() {
    }

    public Result(boolean flag, String message) {
        this.flag = flag;
        this.message = message;
    }

    public static Result ok(String msg){
        return new Result(true,msg);
    }
    public static Result fail(String msg){
        return new Result(false,msg);
    }
    public boolean getFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
